<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>函数-数组求和</title>
		<script>
		function returnArrSum(arr) {
						
						var sum = 0;
						for (var i = 0; i <= arr.length - 1; i++) {
							sum += arr[i];
						}
						return sum;
					}
					
					console.log(returnArrSum([1,2,3,4,5,6]));
</script>
	</head>
	<body>
	</body>
</html>
